home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / AppleTalk ToolKit / NBP / NBPClose.c next >
Encoding:
C/C++ Source or Header  |  1995-02-07  |  2.1 KB  |  67 lines  |  [TEXT/MPS ]

  1. /*******************************************************************\
  2. *    file:         NBPClose.c                                            *
  3. *    version:    1.06ß                                                *
  4. *                                                                     *
  5. * Create the control block and initialize the data for access to the*
  6. * name binding protocol (nbp) stuff.                                *
  7. *                                                                    *
  8. * -----------------------------------------------------------------    *
  9. * By:    Donald Koscheka                                                *
  10. * Date:    14-January, 1988                                            *
  11. * ©    Copyright 1988, Apple Computer, Inc.                            *
  12. *    All Rights Reserved                                                *
  13. *                                                                    *
  14. * -----------------------------------------------------------------    *
  15. *                        Modification History                        *
  16. * -----------------------------------------------------------------    *
  17. *  Date           | By    |                     Description                    *
  18. * -----------------------------------------------------------------    *
  19. * 14-Jan-88    | DK    | file created                                    *
  20. * -----------------------------------------------------------------    *
  21. \*******************************************************************/
  22.  
  23. /*******************************************************************\
  24.                             Build Sequence
  25.                             
  26. C -q2 -g -o "{hpo}"NBPClose.c.o "{nbp}"NBPClose.c
  27.     link  -sn Main=NBPClose -sn STDIO=NBPClose ∂
  28.          -sn INTENV=NBPClose -rt XCMD=307 ∂
  29.          -m NBPCLOSE ∂
  30.           "{hpo}"NBPClose.c.o "{hpo}"atalkxcmd.c.o "{hpo}"xcmdutils.c.o ∂
  31.          "{CLibraries}"CInterface.o ∂
  32.          "{Libraries}"Interface.o ∂
  33.          -o "{hp}"HyperAppleTalk
  34.  
  35. \*******************************************************************/
  36.  
  37. #include <Types.h>
  38. #include <Memory.h>
  39. #include <Resources.h>
  40. #include <OSUtils.h>
  41. #include <appleTalk.h>
  42. #include <HyperXCmd.h>
  43. #include <atalkXCMD.h>
  44. #include <XCMDUtils.h>
  45.  
  46.  
  47. pascal void NBPClose(paramPtr)
  48.     XCmdBlockPtr    paramPtr;
  49. /**********************************
  50. * In:    nil
  51. *
  52. * Out: Error Result is returned to hypercard
  53. **********************************/
  54. {
  55.     NBPBlock     *nbp;
  56.     short        result = noErr;
  57.     
  58.     nbp = (NBPBlock *)RetrieveHandle(paramPtr, GLOBALNBPDATA );
  59.     if( nbp ){
  60.         result = NBPKill( nbp );
  61.         SaveHandle( paramPtr, GLOBALNBPDATA, nil );
  62.         SaveHandle( paramPtr, GLOBALSKTDATA, nil );
  63.     }
  64.     paramPtr->returnValue = ErrorReturn( result );
  65. }
  66.  
  67.